:art: image2

Kimi.Huang 6 年之前
父節點
當前提交
2fafbdae53
共有 3 個文件被更改,包括 15 次插入0 次删除
  1. 1 0
      api/encrypt_views.py
  2. 13 0
      mch/models.py
  3. 1 0
      page/sale_views.py

+ 1 - 0
api/encrypt_views.py

@@ -131,6 +131,7 @@ def decrypt(request):
131 131
         'plaintext': plaintext,
132 132
         'logo_url': brand.brand_logo_url if brand else '',
133 133
         'model_imgs': model.images if model else [],
134
+        'model_imgs2': model.images2 if model else [],
134 135
         'goodsInfo': {
135 136
             'BrandID': brand_pk,
136 137
             'Brand': brand.brand_name if brand else '',

+ 13 - 0
mch/models.py

@@ -228,6 +228,19 @@ class ModelInfo(BaseModelMixin):
228 228
         return imgs
229 229
 
230 230
     @property
231
+    def images2(self):
232
+        imgs = []
233
+        if self.image:
234
+            imgs.append(self.image_url)
235
+        if self.image2:
236
+            imgs.append(self.image2_url)
237
+        if self.image3:
238
+            imgs.append(self.image3_url)
239
+        if self.image4:
240
+            imgs.append(self.image4_url)
241
+        return imgs
242
+
243
+    @property
231 244
     def data(self):
232 245
         return {
233 246
             'jancode': self.jancode,

+ 1 - 0
page/sale_views.py

@@ -380,6 +380,7 @@ def clerk_sale_decrypt_api(request):
380 380
         'plaintext': plaintext,
381 381
         'logo_url': brand.brand_logo_url if brand else '',
382 382
         'model_imgs': model.images if model else [],
383
+        'model_imgs2': model.images2 if model else [],
383 384
         'goodsInfo': {
384 385
             'BrandID': brand_pk,
385 386
             'Brand': brand.brand_name if brand else '',